<script>
import BaseInfoForm from '@/views/basic-information-management/enterprise-basic-information/index.vue'

export default {
  components: { BaseInfoForm },
  model: {
    prop: 'visible',
    event: 'input'
  },
  props: {
    visible: Boolean,
    data: {
      type: Object,
      default () {
        return {}
      }
    }
  },
  methods: {
    clickBack () {
      this.$emit('input', false)
    },
    onSaveSuccess () {
      this.$emit('input', false)
      this.$emit('save-success')
    }
  },
}
</script>
<template>
  <Transition name="el-fade-in">
    <div v-if="visible" class="fullscreen-operate-modal">
      <BaseInfoForm :show-back="true" :data="data" @back="clickBack" @save-success="onSaveSuccess"></BaseInfoForm>
    </div>
  </Transition>
</template>

<style scoped lang="scss">
.fullscreen-operate-modal {
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  z-index: 99;
  background: white;
}
</style>
